package pl.s7n.paint.commands;

import pl.s7n.paint.DrawingTools;

public class CmdFactory {
  public static AbstractStrokeCmd createCmd(DrawingTools tool) {
    switch (tool) {
      case BRUSH:
        return new BrushStrokeCmd();
      case PENCIL:
        return new PencilStrokeCmd();
      case ERASER:
        return new EraserStrokeCmd();
      case LINE:
        return new LineStrokeCmd();
      case RECT:
        return new RectStrokeCmd();
      case ELLIPSE:
        return new EllipseStrokeCmd();
      case FILL_RECT:
        return new FillRectStrokeCmd();
      case FILL_ELLIPSE:
        return new FillEllipseStrokeCmd();
      case FILL:
        return new FloodFillStrokeCmd();
      case TEXT:
        return new TextStrokeCmd();
      default:
        return null;
    }
  }
}
